#pragma once
/*!
 * \file 
 * AudDecoder.h
 */

/*!
 * \brief decoding audio data from MULAW PCM to LINEAR PCM
 *
 * class for decoding audio format
 *
 * - header file: AudDecoder.h
 * - lib: audcodec.lib
 * - DLL: audcodec.dll
 */
class AFX_EXT_CLASS CAudDecoder
{
public:
	CAudDecoder(void);	/**< Constructor 	*/
	~CAudDecoder(void);	/**< Destructor 	*/

	BOOL Decode4Ch(BYTE* pSource, BYTE* pAudio);
	BOOL Decode2Ch(BYTE* pSource, BYTE* pAudio);
	/*!
	 * This function decodes audio data from mulaw PCM to linear PCM
	 *
	 * @param pSrc Pointer to an audio data encoded by MULAW PCM
	 * @param dwSrcSize size in bytes referenced by pSrc
	 * @param pDst Pointer to an audio data decoding to LINEAR PCM
	 * @param dwDstSize Pointer to a size returned the decoded audio data in bytes
	 * 
	 * @remark this function decodes 8bit mulaw PCM to 16bit linear PCM
	 */
	BOOL DecodeAudio(BYTE *pSrc, DWORD dwSrcSize, BYTE *pDst, DWORD *dwDstSize);
};
